<template>
  <div class="departMent">
    <el-tree :data="data"
    :props="defaultProps" @node-click="handleNodeClick"></el-tree>
  </div>
</template>

<script>
export default {
    data() {
      return {
        data: [{
          label: '传智教育',
          children: [{
            label: '总裁办',
          }, {
            label: '行政部',
          }]
        }, {
          label: '人事部',
          children: [{
            label: '财务核算部',
          }, {
            label: '税务管理部',
          }, {
            label: '薪资管理部',
          }]
        }, {
          label: '财务部',
          children: [{
            label: 'PHP研发部',
          }]
        },{
          label: '技术部',
      },{
          label: '运营部',
          children: [{
            label: '上海事业部',
          }, {
            label: '北京事业部',
          }]
        },{
          label: '市场部',
      },]
      }
    },
    methods: {
      handleNodeClick(data) {
        console.log(data);
      }
    }
  };
</script>

<style>
.departMent{
  height: 30vh;
}
</style>